package com.my12306.train.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.my12306.common.model.vo.PageVo;
import com.my12306.train.model.entity.ZoneEntity;
import com.my12306.train.model.vo.ZoneVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ËÕÄÁÏ¦
 * @email
 * @date 2020-07-24 20:58:07
 */
@Mapper
public interface ZoneDao extends BaseMapper<ZoneEntity> {

    /**
     * 分页查询
     * @param pageVo
     * @param logicDelete
     * @return
     */
    List<ZoneEntity> queryZoneByPage(@Param("pageVo") PageVo pageVo, @Param("logicDelete") Integer logicDelete);

    /**
     * 根据条件查询数据总量
     * @param pageVo
     * @param logicDelete
     * @return
     */
    Integer queryZoneCount(@Param("pageVo") PageVo pageVo, @Param("logicDelete") Integer logicDelete);

    /**
     * 批量修改(逻辑删除)
     * @param ids
     * @param logicDelete
     */
    void removeZoneByIds(@Param("list") List<Long> ids, @Param("logicDelete") Integer logicDelete);

    List<ZoneVO> queryAllZone(@Param("logicDelete") int logicDelete);

    ZoneEntity queryZoneMinByZoneFrom(@Param("logicDelete") Integer logicDelete);
}
